package com.dl.mall.utils;

import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;

/**
 * @author DL
 * @create 2022-04-06 13:43
 */
public class JsonUtils {

    public static Map<String, Object> jsonToMap(JSONObject jsonObject){
        Map<String, Object> map = new HashMap<>();
        //循环转换
        for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
            map.put(entry.getKey(), entry.getValue());
        }
        return map;
    }
}
